﻿//Write a method that reverses the digits of given decimal number. Example: 256  652


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ReverseDifitOfDecimal
{
    class ReverseDifitOfDecimal
    {
        static int reversesNumber(int a)
        {
            int lastNumber = a % 10;
            return lastNumber;
        }
        static void WriteLineNumber(int l)
        {
            Console.Write(l);
        }
        static void Main()
        {
            string str = (Console.ReadLine());
            int number1 = int.Parse(str);
            int length = str.Length;
            int numberReg;
            int Reg = 10;
            for (int i = 0; i < length; i++)
            {
                numberReg = reversesNumber(number1);
                WriteLineNumber(numberReg);
                number1 = (number1 - numberReg) / Reg;
            }
            Console.WriteLine();
        }
    }
}
